stage.set_background("schoolhallway")
sprite = codesters.Sprite("person8")
stage.set_gravity(4)
stage.disable_floor()
sprite.set_gravity_off()
sprite.go_to(0, -220)
score = 0
score_board = codesters.Display(score)
try:
tval1 = my_info
tval2 = type(my_info)
except:
tval1 = "DNE"
tval2 = "DNE"
t1 = TestObjective()
t1.add_success("cat" in tval1 and "dog" in tval1 and "pig" in tval1 and tval2 is list, "Great job!")
t1.add_failure(tval1 == "DNE", "Did you add a List of Strings and name it my_info?")
t1.add_failure(tval2 is not list, "Did you add a List of Strings and name if my_info?")
t1.add_creative(("cat" not in tval1 or "dog" not in tval1 or "pig" not in tval1) and tval2 is list, "That's a good list, too!")
tester = TestManager()
tester.add_test_list([t1])
tester.run_tests()
tester.display_first_feedback()
-
Run Code
-
Activity Submitted!
Submit Work
-
Next Activity
-
Stop Running Code
-
Show Chart
-
Show Console
-
Reset Code Editor
-
Codesters How To (opens in a new tab)